package com.changgou.web.gateway.filter;

public class UrlFilter {
    //所有需要传递令牌的地址
    public  static String filterPath="/api/worder/**,/api/wseckillorder,/api/seckill,/api/wxpay,/api/wxpay/**,/api/worder/**,/api/us er/**,/api/address/**,/api/wcart/**,/api/cart/**,/api/categoryReport/**,/api/ord erConfig/**,/api/order/**,/api/orderItem/**,/api/orderLog/**,/api/preferential/* *,/api/returnCause/**,/api/returnOrder/**,/api/returnOrderItem/**";
public static boolean hasAuthorize(String url){
    String[] split = filterPath.replace("**", "").split(",");
    for ( String value:split){
        if (url.startsWith(value)){
            return true;//代表当前的访问地址需要传递令牌
        }
    }
    return false;//代表当前的访问地址不需要传递令牌
}
}
